from rest_framework import serializers

from member.models import Platform, Member


class PlatformSerializer(serializers.ModelSerializer):
    class Meta:
        model = Platform
        fields = '__all__'

class MemberSerializer(serializers.ModelSerializer):
    platform = PlatformSerializer(read_only= True)
    platform_id = serializers.IntegerField(write_only=True)

    class Meta:
        model = Member
        fields = '__all__'